/**
 * Created by afer on 2017/7/11.
 */


var vm = new Vue({
    el: '#app',
    data : {
        newsList: []
    },
    methods:{
        getNewsList: function(){
            var _self = this;
            this.$http.get('/getallnews')
                .then(function (response) {
                    if (response.body.status == '1') {
                        _self.newsList = response.body.content.newsList;
                    } else {
                        window.document.write(response.body.msg);
                    }
                }, function (response) {
                    console.log(response);
                });
        }

    }
}, 'json');

vm.getNewsList();

